<template>
  <div>
    <Modal v-model="isShowPop" width="32" class-name="vertical-center-modal" :mask-closable="false"
      @on-visible-change="closeBtn">
      <!-- 页头 -->
      <div slot="header" class="header-title"></div>
      <!-- 内容 -->
      <div class="content-wrap">
        <img src="@/assets/images/user/way_img.png" class="img-sty" alt="">
        <div>{{ $t('estimation.way_tip_text1') }}</div>
        <div>{{ $t('estimation.way_tip_text2') }}</div>
      </div>
      <!-- 底部 -->
      <div slot="footer" class="footer-wrap">
        <div class="tips-text" @click="jumpBtn()">Submit Now</div>
      </div>
    </Modal>
  </div>
</template>
<script>

import { mapState } from "vuex";
export default {
  data() {
    return {
      isShowPop: false
    }
  },
  computed: {
    ...mapState({
      userInfo: (state) => state.user.userInfo
    })
  },
  methods: {
    open() {
      this.isShowPop = true;
    },
    closeBtn(val) {
      if (val == false) {
        const time = Date.now();
        localStorage.setItem("isCloseTime", time);
        localStorage.setItem('isCloseId', this.userInfo.id)
      }
    },
    jumpBtn() {
      this.isShowPop = false;
      this.$router.push('/user/warehouse')
    }
  }
}
</script>

<style lang="less" scoped>
:deep(.ivu-modal-header) {
  border: none;
  padding: 24px;
}

:deep(.ivu-modal-body) {
  padding: 0 44px;
}

:deep(.ivu-modal-footer) {
  border: none;
  padding: 40px 44px 31px 44px;
  text-align: left;
}

:deep(.ivu-modal-close) {
  position: absolute;
  top: 24px;
  right: 26px;
}

:deep(.ivu-modal-close .ivu-icon-ios-close) {
  color: #333333;
  font-size: 48px;
}

.vertical-center-modal {
  display: flex;
  align-items: center;
  justify-content: center;

  .header-title {
    font-family: Open Sans, Open Sans;
    font-weight: 600;
    font-size: 20px;
    color: #333333;
    line-height: 23px;
  }

  .content-wrap {
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 18px;
    color: #1E1714;
    line-height: 21px;

    .img-sty {
      width: 213px;
      display: block;
      margin: 0 auto;
      margin-bottom: 13px;
    }
  }

  .footer-wrap {
    display: flex;
    justify-content: end;

    .tips-text {
      padding: 10px 32px;
      background: #FF186B;
      font-family: Open Sans, Open Sans;
      font-weight: 400;
      font-size: 18px;
      color: #FFFFFF;
      line-height: 36px;
      border-radius: 8px;
      cursor: pointer;
    }
  }
}
</style>
